<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Remote Control: Device Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Remote Control
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_device.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_device-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Device Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header for the <a class="el" href="class_device.html" title="Header for the Device class.">Device</a> class.  
 <a href="class_device.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_device_8h_source.html">Device.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Device:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_device.png" usemap="#Device_map" alt=""/>
  <map id="Device_map" name="Device_map">
<area href="class_i_device.html" title="Header for the IDevice class." alt="IDevice" shape="rect" coords="65,0,120,24"/>
<area href="class_heating.html" title="Header for the Heating class." alt="Heating" shape="rect" coords="0,112,55,136"/>
<area href="class_stereo.html" title="Header for the Stereo class." alt="Stereo" shape="rect" coords="65,112,120,136"/>
<area href="class_t_v.html" title="Header for the TV class." alt="TV" shape="rect" coords="130,112,185,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa376b407fab23a440fd0123dd5512bc0"><td class="memItemLeft" align="right" valign="top">virtual OnOffState&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#aa376b407fab23a440fd0123dd5512bc0">getOnOffState</a> () const </td></tr>
<tr class="memdesc:aa376b407fab23a440fd0123dd5512bc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the on/off state of a device.  <a href="#aa376b407fab23a440fd0123dd5512bc0"></a><br/></td></tr>
<tr class="separator:aa376b407fab23a440fd0123dd5512bc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a067a2e9d6d05db9fb58f64370a15a3e6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#a067a2e9d6d05db9fb58f64370a15a3e6">Info</a> (std::ostream &amp;stream)</td></tr>
<tr class="memdesc:a067a2e9d6d05db9fb58f64370a15a3e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints information of a device to ostream.  <a href="#a067a2e9d6d05db9fb58f64370a15a3e6"></a><br/></td></tr>
<tr class="separator:a067a2e9d6d05db9fb58f64370a15a3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9762d9490a6d2c1554cc7fdaff0c660"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#ab9762d9490a6d2c1554cc7fdaff0c660">setOnOffState</a> (OnOffState state)</td></tr>
<tr class="memdesc:ab9762d9490a6d2c1554cc7fdaff0c660"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the on/off state of a device.  <a href="#ab9762d9490a6d2c1554cc7fdaff0c660"></a><br/></td></tr>
<tr class="separator:ab9762d9490a6d2c1554cc7fdaff0c660"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6d63bc60b30eacafa6672120ddc9e47"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#af6d63bc60b30eacafa6672120ddc9e47">SwitchOff</a> ()</td></tr>
<tr class="memdesc:af6d63bc60b30eacafa6672120ddc9e47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to switch off a device.  <a href="#af6d63bc60b30eacafa6672120ddc9e47"></a><br/></td></tr>
<tr class="separator:af6d63bc60b30eacafa6672120ddc9e47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dd4a60d216b583074d94c0a1ba63aa0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#a2dd4a60d216b583074d94c0a1ba63aa0">SwitchOn</a> ()</td></tr>
<tr class="memdesc:a2dd4a60d216b583074d94c0a1ba63aa0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to switch on a device.  <a href="#a2dd4a60d216b583074d94c0a1ba63aa0"></a><br/></td></tr>
<tr class="separator:a2dd4a60d216b583074d94c0a1ba63aa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_i_device"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_i_device')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_i_device.html">IDevice</a></td></tr>
<tr class="memitem:a172e12396100def6a01ec1c0b88ee645 inherit pub_methods_class_i_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a172e12396100def6a01ec1c0b88ee645"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_device.html#a172e12396100def6a01ec1c0b88ee645">~IDevice</a> ()</td></tr>
<tr class="memdesc:a172e12396100def6a01ec1c0b88ee645 inherit pub_methods_class_i_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual DTor of <a class="el" href="class_i_device.html" title="Header for the IDevice class.">IDevice</a>. <br/></td></tr>
<tr class="separator:a172e12396100def6a01ec1c0b88ee645 inherit pub_methods_class_i_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a37a945dbcd52749a832a95a1212f1767"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37a945dbcd52749a832a95a1212f1767"></a>
OnOffState&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_device.html#a37a945dbcd52749a832a95a1212f1767">mOnOffState</a></td></tr>
<tr class="memdesc:a37a945dbcd52749a832a95a1212f1767"><td class="mdescLeft">&#160;</td><td class="mdescRight">on/off state of a device <br/></td></tr>
<tr class="separator:a37a945dbcd52749a832a95a1212f1767"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header for the <a class="el" href="class_device.html" title="Header for the Device class.">Device</a> class. </p>
<p>The class <a class="el" href="class_device.html" title="Header for the Device class.">Device</a> represents the base class of all devices the <a class="el" href="class_remote_control.html" title="RemoteControl is able to remotely command devices it is programmed for.">RemoteControl</a> can handle</p>
<p>This class is able to output the state of a <a class="el" href="class_device.html" title="Header for the Device class.">Device</a> and can return the current state. The on and of state can also be set and a device can be switched on and off.</p>
<dl class="section author"><dt>Author</dt><dd>Andreas Lehner </dd></dl>
<dl class="section date"><dt>Date</dt><dd>25.11.2012 </dd></dl>

<p>Definition at line <a class="el" href="_device_8h_source.html#l00020">20</a> of file <a class="el" href="_device_8h_source.html">Device.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa376b407fab23a440fd0123dd5512bc0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">OnOffState Device::getOnOffState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the on/off state of a device. </p>
<p>This function returns the current state of a device. </p>
<dl class="section return"><dt>Returns</dt><dd>OnOffState The OnOffState of the device </dd></dl>

<p>Definition at line <a class="el" href="_device_8cpp_source.html#l00011">11</a> of file <a class="el" href="_device_8cpp_source.html">Device.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a067a2e9d6d05db9fb58f64370a15a3e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Device::Info </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prints information of a device to ostream. </p>
<p>This function puts out information about the state of a device (on/off state) or other device specific states. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The stream where to output the states </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_i_device.html#af5b371ca4028829c91fcf3e6ffcba2bf">IDevice</a>.</p>

<p>Reimplemented in <a class="el" href="class_stereo.html#a4c934e2d1ad7ac2bf19d77a0d665557d">Stereo</a>, <a class="el" href="class_heating.html#ab855f0a6dcb39b182e7f667876f086fe">Heating</a>, and <a class="el" href="class_t_v.html#a8314fb7b0430cc4c7fc76dd311cc9b2f">TV</a>.</p>

<p>Definition at line <a class="el" href="_device_8h_source.html#l00022">22</a> of file <a class="el" href="_device_8h_source.html">Device.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab9762d9490a6d2c1554cc7fdaff0c660"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Device::setOnOffState </td>
          <td>(</td>
          <td class="paramtype">OnOffState&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the on/off state of a device. </p>
<p>The on/off state off a device is set. </p>

<p>Definition at line <a class="el" href="_device_8cpp_source.html#l00015">15</a> of file <a class="el" href="_device_8cpp_source.html">Device.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af6d63bc60b30eacafa6672120ddc9e47"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Device::SwitchOff </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function to switch off a device. </p>
<p>This function changes the on/off state of a device to "off". </p>

<p>Definition at line <a class="el" href="_device_8cpp_source.html#l00007">7</a> of file <a class="el" href="_device_8cpp_source.html">Device.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2dd4a60d216b583074d94c0a1ba63aa0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Device::SwitchOn </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function to switch on a device. </p>
<p>This function changes the on/off state of a device to "on". </p>

<p>Definition at line <a class="el" href="_device_8cpp_source.html#l00003">3</a> of file <a class="el" href="_device_8cpp_source.html">Device.cpp</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_device.html">Device</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
